package com.zhw.goshopping.controller;

import com.zhw.goshopping.common.pojo.GoShoppingResult;
import com.zhw.goshopping.search.service.SearchItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


/**
 * 索引库维护Controller
 */
@Controller
public class IndexManagerController {
	
	@Autowired
	private SearchItemService searchItemService;

	@RequestMapping("/index/import")
	@ResponseBody
	public GoShoppingResult importIndex() {
		GoShoppingResult goShoppingResult = searchItemService.importItemsToIndex();
		return goShoppingResult;
	}
}
